﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HRMS_Model;

namespace DataManager
{
    public class DepartmentManager
    {
        public string DepartmentName { get; set; }

        public static void AddDepartment(Department deptObj)
        {
            using (HRMSEntities deptEntity = new HRMSEntities())
            {
                Department dept = new Department();
                dept.DepartmentName = deptObj.DepartmentName;
                deptEntity.Departments.AddObject(deptObj);
            }
        }
        public static void DeleteDepartment(Department deptObj)
        {
            using (HRMSEntities deptEntity = new HRMSEntities())
            {
                Department dept = new Department();
                dept.DepartmentName = deptObj.DepartmentName;
                deptEntity.Departments.DeleteObject(deptObj);
            }
        }

    }
}
